package top.jacktgq.hsp.view.groupchat;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

import javax.swing.*;

public class ClientHandler extends SimpleChannelInboundHandler<String> {
    private JTextArea ta;
    public ClientHandler(JTextArea ta) {
        this.ta = ta;
    }
    
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
        // 显示消息
        ta.append(msg);
    }
}
